home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / qlib205.zip / QLIB.ZIP / H / STDARG.H < prev    next >
C/C++ Source or Header  |  1997-05-24  |  630b  |  27 lines

  1. /*  stdarg.h
  2.  
  3.     Definitions for accessing parameters in functions that accept
  4.     a variable number of arguments.
  5.  
  6. */
  7.  
  8. #ifndef __STDARG_H__
  9. #define __STDARG_H__
  10.  
  11. #ifdef __VARARGS_H__
  12. #error Can't include both STDARG.H and VARARGS.H
  13. #endif
  14.  
  15. typedef void *va_list;
  16.  
  17. #define __size__(x) ((sizeof(x)+sizeof(int)-1) & ~(sizeof(int)-1))
  18.  
  19. #define va_start(ap, parmN) \
  20.   ((void)((ap) = (va_list)((char _FAR *)(&parmN)+__size__(parmN))))
  21. #define va_arg(ap, type) \
  22.   (*(type _FAR *)(((*(char _FAR *_FAR *)&(ap))+=__size__(type)) \
  23.   -(__size__(type))))
  24. #define va_end(ap) ((void)0)
  25.  
  26. #endif  /* __STDARG_H__ */
  27.